<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}"/>
    <title>studentchangepassword</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript">
        function funvalidate() {
            var np = document.getElementById("new_password").value;
            var cnp = document.getElementById("confirm_new_password").value;
            if (np === cnp) {
                alert("密码修改成功！");
                return true
            } else {
                alert("两次输入的密码不一致，请重新输入！");
                return false
            }
        }
    </script>
</head>
<body>
<form action="${ctx}/TeacherChangePassword" method="post">
    <table>
        <tr>
            <td>请输入新密码：</td>
            <td><input type="password" name="new_password" id="new_password"></td>
        </tr>
        <tr>
            <td>确认密码：</td>
            <td><input type="password" name="conform_new_password" id="confirm_new_password"></td>
        </tr>
        <tr>
            <td><input type="reset" value="重置"></td>
            <td><input type="submit" value="修改" onclick="return funvalidate()"></td>
        </tr>
    </table>
</form>
</body>
</html>
